home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 9 / The PC-SIG Library on CD ROM - Ninth Edition.iso / 1601_700 / DISK1665 / DISK1665.ZIP / LANGMASM.KED < prev    next >
Text File  |  1980-01-01  |  28KB  |  703 lines

  1. .Notice  - Last Update:1988/07/09 17:30
  2. Importance Notice: The information contained in this option are for quick
  3.                    reference only. The accuracy of it should be based on your
  4.                    language manual.
  5. Set Up By        : Kuang H. Tseng
  6. Language         : MACRO ASSEMBLER(5.0) by Microsoft(R)
  7. . 1.   Language Elements
  8.     Character Sets
  9.          A-Z, a-z, 0-9, ? @ _ $ : . [ ] ( ) < > { } + - / *
  10.          & % ! ' ~ | \ = # ^ ; , ` "
  11.     Data fields - (refer to separate key line for more detail)
  12.     Constants - (refer to separate key line for more detail)
  13.     Keywords
  14.     Comments - after special character ';'
  15.     Tokens
  16.     Identifiers - (refer to separate key line for more)
  17.     Macros
  18.     Instructions - (refer to separate key line for more)
  19.     Operators - (refer to separate key line for more)
  20.     Declarations
  21.     Program Line
  22.     Compiler Directives - (refer to separate key line for more)
  23.     Compiler Options - (refer to separate key line for more)
  24. . 2.   Data fields
  25.     DB (byte) - 1 byte
  26.     DW (word) - 2 bytes
  27.     DD (doubleword) - 4 bytes
  28.     DF (farword) - 6 bytes
  29.     DQ (quadword) - 8 bytes
  30.     DT (tenbytes) - 10 bytes
  31. . 3.1  Identifiers (symbols/names/labels)
  32.     - Alphabetic letters A to Z, digits 0 to 9, special characters ? . @ _ $
  33.       (but ? or $ can not stand alone as identifier)
  34.     - The first character must be an alphabetic letter, a special character or .
  35.     - Default is case insensitive but can be overruled with compiler option
  36.     - Up to 31 characters are significant
  37. . 3.2  Predefined Equate Symbols
  38.     @Code     - alias equate for .CODE segment name
  39.     @CodeSize - numeric equate indicates code memory model,0/1/2
  40.     @CurSeg   - current segment name
  41.     @Data     - alias equate for .DATA data group name
  42.     @DataSize - numeric equate that indicates the data memory model
  43.     @FarData  - alias equate for initialized far data segment name
  44.     @FarData? - alias equate for uninitialized far data segment name
  45.     @FileName - current source file
  46. . 3.3  Constants
  47.     Integers
  48.          Binary - radix specifier B, i.e., 01011010B
  49.          Octal -  radix specifier Q or O
  50.          Decimal - radix specifier D
  51.          Hexadecimal - radix specifier H, number start with a decimal digit
  52.     Packed binary coded decimals
  53.     Real numbers - consist of an integer part,a fractional part and an exponent
  54.     Strings - consist of one or more ASCII characters enclosed in ' or "
  55. . 4.1. Operators
  56.   Arithmetic Operator
  57.     +         addition
  58.     -         subtraction/negative unary
  59.     *         multiplication
  60.     /         integer division
  61.     MOD       remainder(modulus)
  62.   Index Operator
  63.     []        addition
  64.   Shift Operator
  65.     SHR
  66.     SHL
  67.   Logical Operators
  68.     NOT       bitwise complement
  69.     AND       bitwise AND
  70.     OR        bitwise inclusive OR
  71.     XOR       bitwise exclusive OR
  72.   Relational Operators
  73.     EQ        true if equal
  74.     NE        true if not equal
  75.     LT        true if less than
  76.     LE        true if less than and equal
  77.     GT        true if greater than
  78.     GE        true if greater and equal
  79.   Segment Override Operator
  80.     :         address relative to a specific segment
  81.   Type Operator
  82.     PTR
  83.     SHORT
  84.     THIS
  85.     HIGH/LOW
  86.     OFFSET
  87.     SEG
  88.     .TYPE
  89.     TYPE
  90.     LENGTH
  91.     SIZE
  92. . 4.2. Operator Precedence
  93.     LENGTH,SIZE,WIDTH,MASK,(),[],<>
  94.     .
  95.     :
  96.     PTR,OFFSET,SEG,TYPE,THIS
  97.     HIGH,LOW
  98.     +,-
  99.     *,/,MOD,SHL,SHR
  100.     +,-(binary)
  101.     EQ,NE,LT,LE,GT,GE
  102.     NOT
  103.     AND
  104.     OR,XOR
  105.     SHORT,.TYPE
  106. . 5.1. List of Instructions (all processors) by Name & Description in Name order
  107.     AAA - ASCII adjust after addition
  108.     AAD - ASCII adjust before division
  109.     AAM - ASCII adjust after multiply
  110.     AAS - ASCII adjust after subtraction
  111.     ADC - add with carry
  112.     ADD - add
  113.     AND - logical and
  114.     CALL - call procedure
  115.     CBW - convert byte to word
  116.     CLC - clear carry flag
  117.     CLD - clear direction flag
  118.     CLI - clear interrupt flag
  119.     CMC - complement carry flag
  120.     CMP - compare two operands
  121.     CMPS/CMPSB/CMPSW/CMPSD - compare string
  122.     CWD - convert word to double
  123.     DAA - decimal adjust after addition
  124.     DAS - decimal adjust after subtraction
  125.     DEC - decrement
  126.     DIV - unsigned divide
  127.     ESC - escape
  128.     HLT - halt
  129.     IDIV - signed divide
  130.     IMUL - signed multiply
  131.     IN - input from port
  132.     INC - increment
  133.     INT - interrupt
  134.     IINTO - interrupt on overflow
  135.     IRET/IRETD - interrupt return
  136.     JA/JNBE - jump if above/not below or equal
  137.     JB/JNAE - jump if below/not above or equal (unsigned comparisons)
  138.     JAE/JNB - jump if above or equal/not below (unsigned comparisons)
  139.     JBE/JNA - jump if below or equal/not above (unsigned comparisons)
  140.     JE/JZ - jump if equal(zero)
  141.     JNE/JNZ - jump if not equal(not zero)
  142.     JL/JNGE - jump if less/not greater or equal (signed comparisions)
  143.     JGE/JNL - jump if greater/not less or equal (signed comparisions)
  144.     JLE/JNG - jump if less or equal/not greater (signed comparisions)
  145.     JG/JNLE - jump if greater/not less or equal (signed comparisions)
  146.     JS - jump if sign
  147.     JNS - jump if not sign
  148.     JC - jump if carry
  149.     JNC - jump if not carry
  150.     JO - jump if overflow
  151.     JNO - jump if not overflow
  152.     JP/JPE - jump if parity/parity even
  153.     JNP/JPO - jump if no parity/parity odd
  154.     JCXZ/JECXZ -jump if CX is zero
  155.     JMP - jump unconditionally
  156.     LAHF -load flags into AH register
  157.     LDS/LES/LFS/LGS/LSS - load far pointer
  158.     LEA - load effective address
  159.     LES/LFS/LGS - load far pointer to extra segment
  160.     LOCK - lock the bus
  161.     LODS/LODSB/LODSW/LODSD - load string operand
  162.     LOOP - loop
  163.     LOOPE/LOOPZ - loop if equal
  164.     LOOPNE/LOOPNZ - loop if not equal
  165.     LSS - load far pointer to stack segment
  166.     MOV - move data
  167.     MOVS/MOVSB/MOVSW/MOVSD - move string data
  168.     MUL - unsigned multiply
  169.     NEG - two's complement negation
  170.     NOP - no operation
  171.     NOT - one's complement negation
  172.     OR - inclusive or
  173.     OUT - output to port
  174.     POP - pop
  175.     POPF/POPFD - pop flags
  176.     PUSH - push
  177.     PUSHF/PUSHFD - push flags
  178.     RCL/RCR/ROL/ROR - rotate
  179.     REP MOVS/MOVSB/MOVSW - repeat string move
  180.     REP STOS/STOSB/STOSW - repeat store string
  181.     REPE/REPZ CMPS/CMPSB/CMPSW - repeat compare string while equal
  182.     REPE/REPZ SCAS/SCASB/SCASW - repeat scan string while equal
  183.     REPNE/REPNZ CMPS/CMPSB/CMPSW - repeat compare string while not equal
  184.     REPNE/REPNZ SCAS/SCASB/SCASW - repeat scan string while not equal
  185.     RET/RETN/RETF - return from procedure
  186.     ROL/ROR - rotate
  187.     SAHF - store ah into flags
  188.     SAL/SAR/SHL/SHR - shift
  189.     SBB - subtract with borrow
  190.     SCAS/SCASB/SCASW/SCASD - scan string flags
  191.     STC - set carry flag
  192.     STD - set direction flag
  193.     STI - set interrupt flag
  194.     STOS/STOSB/STOSW/STOSD - store string data
  195.     SUB - subtract
  196.     TEST - logical compare
  197.     WAIT - wait
  198.     XCHG - exchange
  199.     XLAT/XLATB - translate
  200.     XOR - exclusive or
  201. . 5.2. List of Instructions (80186-80386) by Name & Description in Name order
  202.     BOUND - check array bounds
  203.     ENTER - make stack frame
  204.     INS/INSB/INSD/INSW - input from port to string
  205.     LEAVE - terminate stack frame initialized by ENTER instruction
  206.     OUTS/OUTSB/OUTSD/OUTSW - output a string to a port
  207.     PUSHA - push all general-purpose registers onto stack
  208.     POPA - pop the top 16 bytes of the stack onto DI,SI,BP,SP,BX,DX,CX,AX
  209. . 5.3. List of Instructions (80286-80386) by Name & Description in Name order
  210.     ARPL - adjust requested
  211.     CLTS - clear task switched flag
  212.     LAR - load access rights
  213.     LGDT/LIDT/LLDT - load descriptor table
  214.     LMSW - load machine status word
  215.     LSL - load segment limit
  216.     LTR - load task register
  217.     SGDT/SIDT/SLDT - store descriptor table
  218.     SMSW - store machine status word
  219.     STR - store task register
  220.     VERR/VERW - verify read or write
  221. . 5.4. List of Instructions (80386 only) by Name & Description in Name order
  222.     BSF/BSR - bit scan
  223.     BT/BTC/BTR/BTS - bit tests
  224.     CDQ - convert doubleword to quadword
  225.     CMPSD - compare string in doubleword data element size
  226.     CWDE - convert word to extended double
  227.     INSD - input from port to string in doubleword data element size
  228.     IRETD - interrupt return
  229.     JECXZ - jump if CX is zero
  230.     LFS/LGS/LSS - load far pointer to stack segment
  231.     LODSD - load string operand in doubleword data element size
  232.     MOVSD - move string data in doubleword data element size
  233.     MOVSX - move with sign-extend
  234.     MOVZX - move with zero-extend
  235.     OUTSD - output string to port in doubleword data element size
  236.     POPFD - pop flags into the 32-bit flags register
  237.     POPAD - pop 32-bit registers of AX,CX,DX,BX,SP,BP,DI
  238.     PUSHAD - push 32-bit registers of AX,CX,DX,BX,SP,BP,SI,DI
  239.     PUSHFD - push the 32-bit flags register
  240.     SCASD - scan string in doubleword data element size
  241.     SETA - set if above
  242.     SETAE - set if not above or equal
  243.     SETB - set if below
  244.     SETC - set if carry
  245.     SETE - set if equal/zero
  246.     SETG - set if greater
  247.     SETGE - set if not greater or equal
  248.     SETL - set if less
  249.     SETLE - set if less or equal
  250.     SETNA - set if not above
  251.     SETNAE - set if not above or equal
  252.     SETNB - set if not below
  253.     SETNBE - set if not below or equal
  254.     SETNC - set if not carry
  255.     SETNE - set if not equal
  256.     SETNG - set if not greater or equal
  257.     SETNGE - set if not greater or equal
  258.     SETNL - set if not less
  259.     SETNLE - set if not less or equal
  260.     SETNO - set if not overflow
  261.     SETNP - set if not parity
  262.     SETNS - set if not sign
  263.     SETNZ - set if not zero
  264.     SETO - set if overflow
  265.     SETP - set if parity
  266.     SETPE - set if parity even
  267.     SETS - set if sign
  268.     SETZ - set if zero
  269.     SHLD/SHRD - double precision shift
  270.     STOSD - store string data in doublewod data element size
  271. . 5.5. List of Instructions (8087-80387) by Name & Description in Name order
  272.     F2XM1 - 2^X-1
  273.     FABS - absolute value
  274.     FADD/FADDP/FIADD - add
  275.     FCHS - change sign
  276.     FCLEX/FNCLEX - clear exceptions
  277.     FCOM/FCOMP/FCOMPP/FICOM/FICOMP - comapar
  278.     FDECSTP - decrement stack pointer
  279.     FDISI/FNDISI - disable interrupts
  280.     FDIV/FDIVP/FIDIV - divide
  281.     FDIVR/FDIVRP/FIDIVR - divide reversed
  282.     FENI/FNENI - enable interrupts
  283.     FFREE - free register
  284.     FIST/FISTP - store integer
  285.     FLD/FILD/FBLD - load
  286.     FLDCW - load control word
  287.     FLDENV - load environment state
  288.     FINCSTP - increment stack pointer
  289.     FINIT/FNINIT - initialize coprocessor
  290.     FLD1/FLDZ/FLDPI/FLDL2E/FLDL2T/FLDLG2/FLDLN2 - load constant
  291.     FMUL/FMULP/FIMUL - multiply
  292.     FNOP - no operation
  293.     FPATAN - partial arctangent
  294.     FPREM - partial remainder
  295.     FPTAN - partial tangent
  296.     FRNDINT - round to integer
  297.     FRSTOR - restore saved state
  298.     FSAVE/FNSAVE - save coprocessor state
  299.     FSCALE - scale
  300.     FSQRT - square root
  301.     FST/FSTP/FIST/FISTP/FBSTP - store
  302.     FSTCW/FNSTCW - store control word
  303.     FSTENV/FNSTENV - store environment state
  304.     FSTSW/FNSTSW - store status word
  305.     FSUB/FSUBP/FISUB - subtract
  306.     FSUBR/FSUBRP/FISUBR - subtract reversed
  307.     FWAIT - wait
  308.     FXAM - examine
  309.     FXCH - exchange registers
  310.     FXTRACT - extract exponent and significand
  311.     FYL2X - Y log2(X)
  312.     FYL2XP1 - Y log2(X+1)
  313. . 6.1. EXE program structure
  314.          TITLE     progname
  315.          .MODEL    SMALL
  316.          .DATA
  317.          EXTRN     ?:BYTE
  318.          .CODE
  319.          PUBLIC    progname
  320. progname proc
  321.          ret
  322. progname endp
  323.          END
  324. . 6.2. COM program structure
  325.          TITLE pgmname
  326. CODESEG SEGMENT PARA PUBLIC 'CODE'
  327.          ASSUME CS:CODESEG,DS:CODESEG,ES:CODESEG,SS:CODESEG
  328.          ORG 0100H
  329. BEGIN: JMP PGM_START
  330. ; enter variables here
  331. VAR1     DB        ?
  332. PGM_START:
  333. ; enter logic here
  334.          MOV  VAR1,0
  335.          RET
  336. CODESEG  ENDS
  337.          END BEGIN
  338. . 7.1  Sample of Main Program
  339. ; sample 1
  340.          title     program1
  341.          DOSSEG                   ;Use Microsoft segment convention
  342. cr       EQU       0dh            ;carriage return
  343. lf       EQU       0ah            ;linefeed
  344.          .MODEL    SMALL
  345.          .STACK    64
  346.          .DATA
  347. messg    DB      'Welcome to MASM Assembler programming with kEDITOR',cr,lf,'$'
  348.          .CODE
  349. start:   mov       ax,@DATA       ;load segment address to ds
  350.          mov       ds,ax
  351.  
  352.          mov       dx,OFFSET messg
  353.          mov       ah,09h
  354.          int       21h
  355.  
  356.          mov       ax,4C00h       ;AH=4Ch (DOS Exit function),AL=0 error free
  357.          int       21h
  358.          END       start
  359. . 7.2  Sample of Main Program calling a Subprogram
  360. ; sample 2
  361.          title     program2
  362.          DOSSEG                   ;Use Microsoft segment convention
  363. cr       EQU       13             ;carriage return
  364. lf       EQU       10             ;linefeed
  365.          .MODEL    SMALL
  366.          .STACK    64
  367.          .DATA
  368. messg    DB        'Sample program - Calling subprograms',cr,lf
  369. len_mess EQU       $-messg
  370.          .CODE
  371. start:   mov       ax,@DATA       ;load segment address to ds
  372.          mov       ds,ax
  373.          call      messout        ;calling subprogram messout
  374.          call      done           ;calling subprogram done
  375.  
  376. messout  proc
  377.          mov       bx,1           ;file handle 1 for standard output
  378.          mov       cx,len_mess
  379.          mov       dx,OFFSET messg
  380.          mov       ah,40h
  381.          int       21h
  382.          ret
  383. messout  endp
  384.  
  385. done     proc
  386.          mov       ax,4C00h       ;AH=4Ch (DOS Exit function),AL=0 error free
  387.          int       21h
  388. done     endp
  389.          END       start
  390. . 7.3  Sample of Macro Writing
  391. ; sample 3
  392.          title     program3
  393.          DOSSEG                   ;Use Microsoft segment convention
  394.          .MODEL    SMALL
  395.          .STACK    64
  396. DOSCALL  MACRO     intno
  397.          mov       ah,intno
  398.          int       21h
  399.          ENDM
  400.          .DATA
  401. cr       EQU       13             ;carriage return
  402. lf       EQU       10             ;linefeed
  403. messg    DB        'Sample program - Macro Writing',cr,lf
  404. len_mess EQU       $-messg
  405.          .CODE
  406. start:   mov       ax,@DATA       ;load segment address to ds
  407.          mov       ds,ax
  408.  
  409.          mov       bx,1           ;file handle 1 for standard output
  410.          mov       cx,len_mess
  411.          mov       dx,OFFSET messg
  412.          DOSCALL   40h            ;use macro definition DOSCALL
  413.  
  414.          mov       al,0           ;error free
  415.          DOSCALL   4Ch
  416.  
  417.          END       start
  418. . 7.4  Sample 1 of String Copying Processing
  419. str1     DB        'Sample program - String Handling',cr,lf
  420. str1len  EQU       $-str1
  421. str2     DB        50 DUP(' ')
  422.          ...
  423.          cld
  424.          mov       si,offset str1
  425.          mov       di,offset str2
  426.          mov       cl,str1len
  427.          xor       ch,ch
  428.          shr       cx,1
  429.          jnc       moveword
  430.          movsb
  431. moveword:
  432.          rep       movsw
  433. . 7.5  Sample 2 of String Copying Processing
  434.          cld                      ;move/copy string from string1 to string2
  435.          lea       si,string1
  436.          lea       di,string2
  437.          mov       cx,len_str1
  438.          rep movsb
  439.          mov       cx,len_str1
  440.          mov       dx,OFFSET string2
  441. . 7.6  Sample of String Searching Processing
  442.          cld                      ;use of scasb to scan
  443.          mov       cx,len_str2
  444.          lea       di,string2
  445.          mov       al,'l'         ;scan string2 for 'l'
  446.          repne scasb
  447.          jne       notfnd         ;not found
  448. found:   mov       ah,0           ;found
  449.          dec       di             ;point back to offset of 'l'
  450.          jmp short jump
  451.          
  452. notfnd:  mov       ah,1
  453. jump:
  454. . 7.7  Sample of Table Processing
  455. ; sample 5
  456.          title     program5
  457.          DOSSEG                   ;Use Microsoft segment convention
  458.          .MODEL    SMALL
  459.          .STACK    64
  460.          .DATA
  461. table    DB        'MONDAY   '
  462.          DB        'TUESDAY  '
  463.          DB        'WEDNESDAY'
  464.          DB        'THURSDAY '
  465.          DB        'FRIDAY   '
  466.          DB        'SATURDAY '
  467.          DB        'SUNDAY   '
  468. NINE     DB        9
  469. table_width EQU    9
  470. weekday  DB        9 dup(" ")
  471.          .CODE
  472. start:   mov       ax,@DATA       ;load segment address to ds
  473.          mov       ds,ax
  474.          mov       es,ax
  475.  
  476.          lea       si,table
  477.          mov       al,3           ;third weekday 
  478.          dec       al
  479.          mul       NINE
  480.          add       si,ax
  481.          mov       cx,table_width
  482.          cld
  483.          lea       di,weekday
  484.          rep  movsb               ;should have 'WEDNESDAY' in weekday
  485.          
  486.          mov       ax,4C00h       ;error free
  487.          int       21h
  488.  
  489.          END       start
  490. . 7.8  Sample of Loop Processing
  491.          jcx       jumploop
  492. zeroloop:
  493.          mov       byte ptr [si],0
  494.          inc       si
  495.          loop      zeroloop
  496. jumploop:
  497. . 7.9  Sample of Subroutine Interface with C
  498. _SumOf3  proc
  499.          push      bp
  500.          mov       bp,sp
  501.          sub       sp,2
  502.          mov       ax,[bp+4]
  503.          add       ax,[bp+6]
  504.          mov       [bp-2],ax
  505.          mov       ax,[bp+8]
  506.          add       ax,[bp-2]
  507.          mov       sp,bp
  508.          pop       bp
  509.          ret
  510. _SumOf3  endp
  511. . 8.   Compiler Directives
  512. Segment
  513.     SEGMENT        ENDS      GROUP          ASSUME         END
  514. Data Allocation
  515.     DB   DW   DD   DF   DQ   DT   LABEL     ALIGN     EVEN ORG
  516. . 9.   Compiler Options
  517.     /A                  writes segments in alphabetical order
  518.     /B                  sets buffer size
  519.     /C                  specifies a cross-reference file
  520.     /D                  creates Pass 1 listing
  521.     /Dsymbol[=value]    Defines assembler symbol
  522.     /E                  creates code for emulated floating-point instructions
  523.     /H                  lists command-line syntax and all assembler options
  524.     /Ipathname          sets include-file search path
  525.     /L                  specifies an assembly-listing file
  526.     /ML                 makes names case sensitive
  527.     /MU                 converts names to uppercase letters
  528.     /MX                 makes public and external names case sensitive
  529.     /N                  suppresses tables in listing file
  530.     /P                  checks for impure code
  531.     /S                  writes segments in source-code order
  532.     /T                  suppresses messages for successful assembly
  533.     /V                  displays extra statistics to screen
  534.     /W{0/1/2}           sets error display level
  535. .10.   BIOS Interrupts
  536.     INT 05H             Print the screen
  537.     INT 10H   00H       Set video mode
  538.               01H       Set cursor size  
  539.               02H       Set cursor position
  540.               03H       Read cursor position
  541.               04H       Read light-pen position
  542.               05H       Set active display page
  543.               06H       Scroll window up
  544.               07H       Scroll window down
  545.               08H       Read character and attribute at cursor position
  546.               09H       Write character and attribute at cursor
  547.               0AH       Write character
  548.               0BH       Set color palette
  549.               0CH       Write graphics pixel dot
  550.               0DH       Read graphics pixel dot
  551.               0EH       Write character in teletype (TTY) mode
  552.               0FH       Get current video display mode
  553.               10H       Set palette registers
  554.               13H       Write character string
  555.     INT 11H             Equipment Determination
  556.     INT 12H             Memory Size Determination
  557.     INT 13H   00H       Reset diskette system
  558.               01H       Get diskette status
  559.               02H       Read diskette sectors
  560.               03H       Write diskette sectors
  561.               04H       Verify diskette sectors
  562.               05H       Format disk track
  563.     INT 14H   00H       Initialize serial communications port parameters
  564.               01H       Send character to communications port
  565.               02H       Read character from communications port
  566.               03H       Get serial communications port status
  567.     INT 16H   00H       Read a character
  568.               01H       Check if character is ready for reading
  569.               02H       Get current shift status
  570.     INT 17H   00H       Printer output
  571.               01H       Initialize printer port
  572.               02H       Read printer port status
  573.     INT 18H             ROM BASIC entry
  574.     INT 19H             Bootstrap loader
  575.     INT 1AH   00H       Read time clock
  576.               01H       Set time clock
  577.               04H       Read date from time clock
  578.               05H       Set date in time clock
  579. .11.   DOS Interrupts
  580.     INT 21H   00H       Program terminate
  581.               01H       Keyboard input with echo
  582.               02H       Display character output
  583.               03H       Auxiliary input
  584.               04H       Auxiliary output
  585.               05H       Printer output
  586.               06H       Direct console input/output
  587.               07H       Direct console input without echo
  588.               08H       Character input without echo
  589.               09H       Display character string
  590.               0AH       Buffered keyboard input
  591.               0BH       Get keyboard status
  592.               0CH       Clear keyboard buffer and then input
  593.               0DH       Disk reset
  594.               0EH       Select default disk drive
  595.               0FH       Open file
  596.               10H       Close file
  597.               11H       Search for first matching disk filename
  598.               12H       Search for next matching disk filename
  599.               13H       Delete file
  600.               14H       Sequential read
  601.               15H       Sequential write
  602.               16H       Create file
  603.               17H       Rename file
  604.               19H       Get default disk drive
  605.               1AH       Set disk transfer area address
  606.               1BH       Get allocation table information
  607.               21H       Random read
  608.               22H       Random Write
  609.               23H       Get file size (in record count)
  610.               24H       Set random record number
  611.               25H       Set interrupt vector
  612.               26H       Create a new program segment prefix
  613.               27H       Random block read
  614.               28H       Random block write
  615.               29H       Parse filename
  616.               2AH       Get date
  617.               2BH       Set date
  618.               2CH       Get time
  619.               2DH       Set time
  620.               2EH       Set/reset verify switch
  621.               2FH       Get disk transfer area address
  622.               30H       Get MS-DOS version number
  623.               31H       Terminate and stay resident
  624.               33H       Get/set Ctrl-Break
  625.               35H       Get interrupt vector
  626.               36H       Get free disk space
  627.               38H       Get/set country-dependent information
  628.               39H       Make subdirectory
  629.               3AH       Remove subdirectory
  630.               3BH       Change current directory
  631.               3CH       Create file
  632.               3DH       Open file
  633.               3EH       Close file
  634.               3FH       Read from file or device
  635.               40H       Write to file or device
  636.               41H       Delete file
  637.               42H       Move file pointer
  638.               43H       Get/set file attributes
  639.               44H       IOCTL - Device driver control
  640.               45H       Duplicate file handle
  641.               46H       Force handle duplication
  642.               47H       Get current directory
  643.               48H       Allocate memory
  644.               49H       Release allocated memory
  645.               4AH       Modify allocated memory block
  646.               4BH       Load/execute program
  647.               4CH       Terminate process with return code
  648.               4DH       Get return code of subprogram
  649.               4EH       Search for first match
  650.               4FH       Search for next match
  651.               54H       Get verify flag
  652.               56H       Rename file
  653.               57H       Get/set file date and time
  654.               58H       Get/set allocation strategy
  655.               59H       Get extended error code information
  656.               5AH       Create temporary file
  657.               5BH       Create new file
  658.               5CH       Lock/unlock file access
  659.               62H       Get PSP address
  660.     INT 22H             Terminate address
  661.     INT 23H             Control-C/Control Break address
  662.     INT 24H             Critical error handler address
  663.     INT 25H             Absolute disk read
  664.     INT 26H             Absolute disk write
  665.     INT 27H             Terminate and stay resident
  666.     INT 2FH             Print spool control
  667. .12.   Keyboard Scan Codes
  668.     Key  in HEX  in Dec        Key  in HEX  in Dec        Key  in HEX  in Dec
  669.     ---  ------  ------        ---  ------  ------        ---  ------  ------
  670.     A a    1E      30          F1     3B      59           1     02       2
  671.     B b    30      48          F2     3C      60           2     03       3
  672.     C c    2E      46          F3     3D      61           3     04       4
  673.     D d    20      32          F4     3E      62           4     05       5
  674.     E e    12      18          F5     3F      63           5     06       6
  675.     F f    21      33          F6     40      64           6     07       7
  676.     G g    22      34          F7     41      65           7     08       8
  677.     H h    23      35          F8     42      66           8     09       9
  678.     I i    17      23          F9     43      67           9     0A      10
  679.     J j    24      36          F10    44      68           0     0B      11
  680.     K k    25      37
  681.     L l    26      38           !     02       2         Left    4B      75
  682.     M m    32      50           @     03       3         Right   4D      77
  683.     N n    31      49           #     04       4          Up     48      72
  684.     O o    18      24           $     05       5         Down    50      80
  685.     P p    19      25           %     06       6
  686.     Q q    10      16           ^     07       7       Num Lock  45      69
  687.     R r    13      19           &     08       8    Scroll Lock  46      70
  688.     S s    1F      31           *     09       9      Caps Lock  3A      58
  689.     T t    14      20           (     0A      10         Prt Sc  37      55
  690.     U u    16      22           )     0B      11
  691.     V v    2F      47          _ -    0C      12         Home    47      71
  692.     W w    11      17          + =    0D      13          End    4F      79
  693.     X x    2D      45          | \    2B      43         PgUp    49      73
  694.     Y y    15      21          { [    1A      26         PgDn    51      81
  695.     Z z    2C      44          } ]    1B      27
  696.                                : ;    27      39          Ins    52      82
  697.      Esc   01       1          " ',   28      40          Del    53      83
  698.      Tab   0F      15          < ,.   33      51
  699.     Ctrl   1D      29          > .    34      52     Left Shift  2A      42
  700.      Alt   38      56          ? /    35      53    Right Shift  36      54
  701.  Space Bar 39      57          ~ `    29      41            -    4A      74
  702.    Return  1C      28      Backspace  0E      14            +    4E      78
  703.